[Mikolaj Jedrzejewski] iP#97
Open
mikolajed wants to merge 42 commits into
Open
Conversation
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.
Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
jadenlimjc
reviewed
Sep 5, 2024
jadenlimjc
left a comment
There was a problem hiding this comment.
looks good overall but some spacing issues.
| return "[ ] " + name; | ||
| } | ||
| else { | ||
| } else { |
There was a problem hiding this comment.
Good changes to maintain code quality standard.
| this.name = name; | ||
| this.status = false; | ||
| } | ||
|
|
| public static void greet() { | ||
| String helloMsg = "Welcome, seeker. I am " + botName + ".\n" + | ||
| "What brings you here?"; | ||
| IO.printResponse(helloMsg); |
| case "list" -> listTasks(); | ||
| case "add" -> addTask(value); | ||
| case "mark" -> markTask(Integer.parseInt(value)); | ||
| default -> IO.printResponse("Hmm. I am not sure what you mean."); |
Metanyu
reviewed
Sep 5, 2024
| case "list" -> listTasks(); | ||
| case "add" -> addTask(value); | ||
| case "mark" -> markTask(Integer.parseInt(value)); | ||
| default -> IO.printResponse("Hmm. I am not sure what you mean."); |
There was a problem hiding this comment.
nice change to make this much more readable!
| } | ||
| else { | ||
| } else { | ||
| IO.printResponse("There is no such task :("); |
| IO.init(); | ||
| IO.greet(); | ||
|
|
||
| boolean byeSaid = false; |
There was a problem hiding this comment.
can change name to be more boolean-like i.e isByeSaid?
| public static void greet() { | ||
| String helloMsg = "Welcome, seeker. I am " + botName + ".\n" + | ||
| "What brings you here?"; | ||
| "What brings you here?"; |
There was a problem hiding this comment.
I think the original looks good already.
yuanners99
reviewed
Sep 19, 2024
yuanners99
left a comment
There was a problem hiding this comment.
Awesome job! Your code is both efficient and easy to read. Remember to add comments :)
| commandType = parseCommandType(rawText); | ||
| argumentList = new ArrayList<>(); | ||
|
|
||
| switch (commandType) { |
There was a problem hiding this comment.
Note there is no indentation for case clauses.
| Pattern pattern = Pattern.compile("add\\s(.+)"); | ||
| Matcher matcher = pattern.matcher(rawText); | ||
|
|
||
| String what = ""; |
There was a problem hiding this comment.
Try to minimise duplicated codes to improve code quality.
Add Level-8
Add Level-9: finding tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.